Skip to main content

How to use explicit wait in Selenium

Timer Practice

Timed Text Change (setTimeout)

Click Start to update the text at 2s, 4s, 15s, and 18s. Start is disabled while running to prevent overlapping timers.

2s → 4s → 15s → 18s
Output data-testid=demo-text

WebDriver

Automation tip: wait for text change on [data-testid='demo-text'].